package com.macro.mall.service;

import com.macro.mall.common.api.CommonResult;
import com.macro.mall.model.MbrMemberScore;
import com.macro.mall.model.MbrMemberScoreStatistics;
import com.macro.mall.vo.TagStatistics;
import com.macro.mall.vo.TrainingAvgStatistics;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * MbrMemberScore的服务接口
 * 
 * @author 
 *
 */
public interface MbrMemberScoreService {
	/**
	 * 获得MbrMemberScore数据集,可以通过辅助工具Assist进行条件查询,如果没有条件则传入null
	 * 
	 * @return
	 */
    List<MbrMemberScore> find(MbrMemberScore value);
	
	/**
	 * 通过MbrMemberScore的id获得MbrMemberScore对象
	 * 
	 * @param id
	 * @return
	 */
    MbrMemberScore findOne(Long id);
	
	/**
	 * 将MbrMemberScore中属性值不为null的数据到数据库
	 * 
	 * @param value
	 * @return
	 */
    CommonResult saveNotNull(MbrMemberScore value);
	
	/**
	 * 通过MbrMemberScore的id更新MbrMemberScore中属性不为null的数据
	 * 
	 * @param enti
	 * @return
	 */
    CommonResult updateNotNullById(MbrMemberScore enti);
	
	/**
	 * 通过MbrMemberScore的id删除MbrMemberScore
	 * 
	 * @param id
	 * @return
	 */
    CommonResult deleteById(Long id);

    MbrMemberScore findOne(Integer targetType, String targetId);

	TrainingAvgStatistics selectTrainingAvg(Integer trainingId);

	List<MbrMemberScoreStatistics> findAll(String username, String phone, Integer targetType, String communityName, String courseName, Integer pageNum, Integer pageSize);

	List<TagStatistics> scoreMax(String commonType, Integer targetType, Integer targetId, Integer num);

	void exportExcelScore(HttpServletResponse response, String title, String[] headers, List<MbrMemberScoreStatistics> resultList, List<String> listColumn);
}
